function viewCart() {
  document._cart.submit();
}

function clearSimpleSearch() {
  var terms = document.getElementById('terms');
  terms.value = "";
}

function fillSimpleSearch() {
  var terms = document.getElementById('terms');
  if (terms.value == "") {
    terms.value = "CITY, ZIP";
  }
}

function translateCodes(str,id) {
   var codes = new Array();
   codes["O"] = "Open";
   codes["C"] = "Closed"; 
   codes["B"] = "Beginners";
   codes["S"] = "Steps";
   codes["T"] = "Traditions";
   codes["BB"] = "Big Book";
   codes["D"] = "Discussion";
   codes["OD"] = "Open Discussion";
   codes["CD"] = "Closed Discussion";
   codes["OS"] = "Open Speaker";
   codes["YP"] = "Young People";
   codes["G"] = "Gay / All Welcome";
   codes["HA"] = "Handicap Accessible";
   codes["M"] = "Men's Meeting";
   codes["W"] = "Women's Meeting";
   codes["WM"] = "Women / All Welcome";
   codes["DF"] = "Sign Language Interpreted";
   codes["CP"] = "Couples";
   codes["LM"] = "Lunch Meeting";
   codes["SP"] = "Spanish";
   codes["GV"] = "Grapevine";
   codes["A"] = "Al-Anon";
   codes["RU"] = "Russian";

   var result = "";
   var values = new Array();
   values = str.split(",");
   values.reverse(); 

   for (var i in values) {
     if (result !== "") {
       result = codes[values[i]] + "," + result;
     } else {
       result = codes[values[i]];
     }
   }

   document.getElementById(id).title = result;
}

